About Drawing, Coordinate Conversion, and Clipping
When you draw a QuickDraw GX shape, you are converting its internal representation into an image on an output device. QuickDraw GX uses information in the shape object and several other objects, including the view-related objects, to control how the shape is rendered. In brief, when you execute a drawing command QuickDraw GX follows this sequence of tasks:
The mapping operations specified in the transform, view port, and view device objects are concatenated during drawing, meaning that the operation is applied at one stage and the result is then used as input to the next calculation, and so on. Mapping is thus cumulative.
- It extracts the geometry of the shape object.
- It applies stylistic and color information from the style object and ink object.
- It applies the clip, and then the mapping, from the transform object.
- It applies the mapping, and then the clip, from one or more view port objects.
- It applies the mapping, and then the clip, from one or more view device objects.
The clipping mechanism computes the intersection of the clip shapes of the transform object, view port objects, and view device objects. Each time a clip is applied, the visibility of a shape can only be further restricted.
The following sections discuss this process in more detail, describing how QuickDraw GX uses four separate coordinate spaces to specify a shape during the
stages of the drawing process, and what effects you can control at each stage.
Subtopics
- QuickDraw GX Coordinates
- Geometry Space
- Local Space
- Global Space
- Device Space